﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using WareHouse.Domain;

namespace WareHouse.DB.AllDbContext
{
    public class BaseDbContext : DbContext
    {
        //public BaseDbContext(DbContextOptions options) : base(options)
        //{
        //}
        //public DbSet<Admin> Admin {  get; set; }
        //public DbSet<Role> Role {  get; set; }
        //public DbSet<Menu> Menu {  get; set; }
        //public DbSet<RoleMenu> RoleMenu {  get; set; }
        //public DbSet<Adminrole> Adminrole {  get; set; }
        //public BaseDbContext() : base()//一定要有默认构造方法，否则在生成migration时会报错。
        //{

        //}

        //protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        //{
        //    optionsBuilder.UseMySql("Server=localhost;Port=3306;Database=WareHose;Uid=root;Pwd=zhoujing2121;", ServerVersion.AutoDetect("Server=localhost;Port=3306;Database=WareHose;Uid=root;Pwd=zhoujing2121;"));
        //}
    }
}
